import { MutableRefObject, ReactNode } from "react"

export type AppPortalActionType = {
  open: () => void,
  close: () => void,
}

export type AppPortalPorpsType = {
  actionRef?: MutableRefObject<AppPortalActionType | undefined>,
  /**
   * 默认是否显示
   */
  defaultVisible?: boolean,
  /**
   *显示控制
    */
  visible?: boolean,
  // 内容默认样式
  contentDefaultStyle?: boolean,
  classNames?: string,
  /**
   * 组件所在位置
   */
  position?: 'top' | 'right' | 'bottom' | 'left' | 'center',
  children: ReactNode | ((visible: boolean) => ReactNode),
  // 当关闭被点击 
  onClose?: () => void,
  /**
   * 背景模糊
   */
  bgBlur?: boolean,
  /**
  /**
   * 背景遮罩
   */
  bgMark?: boolean,
  /**
   * 点击其他地方关闭
   */
  clickOtherClose?: boolean,
  /**
   * 是否开启移动端适配
   */
  contentMobileAdaptation?: boolean,
  /**
   * 退出不销毁 
   */
  unmountOnExit?: boolean,
}